# Maintainer: Brett Cornwall <ainola@archlinux.org>
# Contributor: Adrian Perez de Castro <aperez@igalia.com>

pkgdesc='Library to create Wayland desktop components using the Layer Shell protocol'
pkgname=gtk-layer-shell
pkgver=0.8.1
pkgrel=1
arch=(loong64 x86_64)
license=(LGPL3)
url="https://github.com/wmww/gtk-layer-shell"
depends=(
    "gtk3"
    "wayland"
)
makedepends=(
    "gtk-doc"
    "gobject-introspection"
    "meson"
    "ninja"
    "valabind"
)
source=("$pkgname-$pkgver.tar.gz::https://github.com/wmww/gtk-layer-shell/archive/v$pkgver.tar.gz")
sha512sums=('070673a73166c9fd0ea10e6aa98c480318fbf8a6c2dff2a9b4900aea40bb59680d41d9bba9917953fabe4358c0dfa6c3d0221c579ada37cee72ce23433b40329')

build() {
    meson --prefix=/usr \
          --wrap-mode=nofallback \
          --buildtype=plain \
          -Dtests=true \
          -Ddocs=true \
          -Dintrospection=true \
          "$pkgname-$pkgver" \
          build
    ninja -C build
}

check() {
    ninja -C build test
}

package() {
    DESTDIR="$pkgdir" ninja -C build install
}
